package com.edu.user.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.edu.user.domain.dto.DiseaseDTO;
import com.edu.user.domain.po.Disease;
import com.edu.user.mapper.DiseaseMapper;
import com.edu.user.service.DiseaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DiseaseServiceImpl extends ServiceImpl<DiseaseMapper, Disease> implements DiseaseService {

    @Autowired
    private DiseaseMapper diseaseMapper;

    @Override
    public List<DiseaseDTO> getAllDiseaseIdsAndNames() {
        return diseaseMapper.selectAllDiseaseIdsAndNames();
    }

    @Override
    public Disease getDiseaseById(Long diseaseId) {
        return getById(diseaseId);
    }
}
